//
//  BHCommonGameModel.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/8/9.
//

import UIKit

class BHCommonGameModel {
    var gameId: String = ""
    var name: String = ""
    var coverUrl: String = "" // 封面图片
    var cityName: String = ""
    var regionName: String = "" // 区域
    var distance: String = ""
    var sponsor: String = "" // 主办方
    var startTime: String = ""
    var fee: String = ""
    var eventId: String = ""
    
    
    var feeType: Int = 0 // 0免费 1报名费 2押金
    var number: Int = 0

    func parseDic(_ dic: [String: Any]) {
        self.gameId = BHJsonTool.decodeStringFromDic(dic: dic, key: "id")
        self.eventId = BHJsonTool.decodeStringFromDic(dic: dic, key: "eventId")
        self.name = BHJsonTool.decodeStringFromDic(dic: dic, key: "name")
        self.coverUrl = BHJsonTool.decodeStringFromDic(dic: dic, key: "coverUrl")
        self.cityName = BHJsonTool.decodeStringFromDic(dic: dic, key: "cityName")
        self.regionName = BHJsonTool.decodeStringFromDic(dic: dic, key: "regionName")
        self.distance = BHJsonTool.decodeStringFromDic(dic: dic, key: "distance")
        self.sponsor = BHJsonTool.decodeStringFromDic(dic: dic, key: "sponsor")
        self.startTime = BHJsonTool.decodeStringFromDic(dic: dic, key: "startTime")
        self.fee = BHJsonTool.decodeStringFromDic(dic: dic, key: "fee")

        self.feeType = BHJsonTool.decodeIntFromDic(dic: dic, key: "feeType")
        self.number = BHJsonTool.decodeIntFromDic(dic: dic, key: "number")
    }

}
